//
//  Row.h
//  
//  jhf
//
//  Created by 计海峰 on 2019/6/28.
//  Copyright © 2019 计海峰. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@class BindModel;

@interface Row : NSObject

+ (instancetype)new NS_UNAVAILABLE;

- (instancetype)init NS_UNAVAILABLE;

+ (NSBundle *)table_refreshBundle;

// 绑定的key
@property (nonatomic, copy) NSString *bindKey;

@property (nonatomic, copy, readonly) NSString *reuseIdentifier;

@property(nonatomic, strong, readonly) Class cellClass;

//@property (nonatomic, strong) BindModel *bindModel;

@property (nonatomic, strong) BindModel *model;

@property (nonatomic, copy) NSString *key;

// cell 的高度 直接返回给table 代理
@property (nonatomic, assign) CGFloat height;

// 默认false 自动缓存高度到height (谨慎使用 会导致 auto height 改变不了值)
@property (nonatomic, assign) BOOL autoCacheHeight;

@property (nonatomic, copy) NSString *bgColorHex;

// method
@property (nonatomic, copy) NSString *method;

@property (nonatomic, copy) UITableViewCell *(^configCellBlock)(NSIndexPath *indexPath, UITableView *tableView);

// MARK:- 初始化 ⚠️⚠️⚠️ 禁止直接使用
+ (instancetype)rowIdentify:(NSString *)identify;
+ (instancetype)rowClass:(Class)cls;
+ (instancetype)rowClass:(Class)cls model:(id)model;
+ (instancetype)rowClassStr:(NSString *)clsStr;
+ (instancetype)rowClassStr:(NSString *)clsStr model:(id)model;

// MARK:判断model类型
- (id)modelClass:(Class)cls;

@property (nonatomic, strong) NSBundle *bundle;

@end

NS_ASSUME_NONNULL_END
